home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19981211-19990422 / 000399_news@watsun.cc.columbia.edu _Mon Mar 22 13:46:00 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id NAA04791
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Mon, 22 Mar 1999 13:45:59 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id NAA11058
  7.     for kermit.misc@watsun.cc.columbia.edu; Mon, 22 Mar 1999 13:30:20 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: modem pool
  11. Date: 22 Mar 1999 18:30:13 GMT
  12. Organization: Columbia University
  13. Message-ID: <7d627l$apd$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. In article <7d5r06$kgv$1@user2.teleport.com>,
  17. Tony R. Bennett <trb@user2.teleport.com> wrote:
  18. : Platform: C-kermit 6.0 running on AIX 4.3.1
  19. : Has anyone created a kermrc file that will perform a 'set line' command
  20. : from a 'pool' of ports...???
  21. It's very easy, but first you have to know the names of the ports in the
  22. pool.  Then just do:
  23.  
  24.   set line /dev/tty01
  25.   if success goto ok
  26.   set line /dev/tty02
  27.   if success goto ok
  28.   ...
  29.   :OK
  30.  
  31. Of course you can also get the device names from a file:
  32.  
  33.   set modem type generic                 ; Specify some kind of modem
  34.   open read xxx                          ; Where xxx is the filename
  35.   if fail stop 1 Can't open devices file
  36.   while true {
  37.       read devname
  38.       if fail break
  39.       echo Trying \m(devname)...
  40.       set line \m(devname)
  41.       if success goto ok
  42.   }
  43.   close read
  44.   stop 1 No devices are available - try again later
  45.   :OK
  46.   set speed 57600    ; Have device - set it up.
  47.  
  48. To be even fancier, you can read the UUCP Devices file and parse it to
  49. get the device name, speed, and modem type.  Left as an exercise to the
  50. reader :-)  (Feel free to post.  But note that these files tend to vary
  51. in format from platform to platform, version to verion).
  52.  
  53. : If not (I can do it from a script) is there a way to from within Kermit
  54. : to run a UNIX 'script' and capture the UNIX script's output and use it
  55. : as the device in a 'set line' command ???
  56. You can do that too in C-Kermit 7.0:
  57.  
  58.   http://www.columbia.edu/kermit/ck70.html
  59.  
  60. The new functions \fcommand(unix-command) and \frcommand(unix-command)
  61. return the output from the UNIX command supplied as an argument.  See
  62. the ckermit2.txt file that comes with C-Kermit 7.0 (currently in Beta test)
  63. for details.
  64.  
  65. - Frank